package org.ccay.i18n;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.ccay.core.base.BaseResourceVO;

/**
 * 
 * 国际化资源 对象
 * @since 2011-12-5
 */
public class I18nVO extends BaseResourceVO {

	/**
	 * 序列id
	 */
	private static final long serialVersionUID = 3506590958805596612L;
	
	/**
	 * 虚拟主键（i18nLanguage + i18nKey）
	 */
	private String virtualId;
	
	/**
	 * 资源key
	 */
	private String i18nKey;
	
	/**
	 * 内容
	 */
	private String i18nContent;
	
	/**
	 * 语种
	 */
	private String i18nLanguage;
	
	/**
	 * 复合主键
	 * @return
	 */
	public String getLanguageKeyPK(){
		return i18nLanguage + "|" + i18nKey;
	}
	
	/**
	 * 时间查询条件
	 */
	private Map<String, Date> extDates = new HashMap<String,Date>();

	public Map<String, Date> getExtDates() {
		return extDates;
	}

	public void setExtDates(Map<String, Date> extDates) {
		this.extDates = extDates;
	}

	public String getVirtualId() {
		return virtualId;
	}

	public void setVirtualId(String virtualId) {
		this.virtualId = virtualId;
	}

	public String getI18nKey() {
		return i18nKey;
	}

	public void setI18nKey(String i18nKey) {
		this.i18nKey = i18nKey;
	}

	public String getI18nContent() {
		return i18nContent;
	}

	public void setI18nContent(String i18nContent) {
		this.i18nContent = i18nContent;
	}

	public String getI18nLanguage() {
		return i18nLanguage;
	}

	public void setI18nLanguage(String i18nLanguage) {
		this.i18nLanguage = i18nLanguage;
	}
	
	public void fillVirtualId(){
		this.virtualId = getLanguageKeyPK();
	}

}
